package com.selfdriving.activity;
import java.util.ArrayList;
import java.util.List;

import net.tsz.afinal.annotation.view.ViewInject;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.GridView;
import android.widget.ImageView;
import android.widget.TextView;

import com.selfdriving.R;
import com.selfdriving.adapter.ImageAdapter;
import com.selfdriving.utils.PhotoUtil;

public class AddFeatureRecordActivity extends BaseActivity {
	@ViewInject(id = R.id.topBack,click="topBack")
	ImageView topBack;
	
	@ViewInject(id=R.id.topText)
	TextView topText;
	
	@ViewInject(id=R.id.topRight,click="topRight")
	Button topRight;

	@ViewInject(id = R.id.image_gridview)
	GridView image_gridview;
	
	private ImageAdapter adapter;
	
	private List<Bitmap> bitmaps;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.add_feature_record);
		topRight.setText("发表");
		topText.setText("发表新游记");
		bitmaps = new ArrayList<Bitmap>();
		bitmaps.add(PhotoUtil.readBitmap(this, R.drawable.ico_image_add));
		adapter = new ImageAdapter(this, bitmaps);
		image_gridview.setAdapter(adapter);
	}
	
	public void topBack(View v){
		this.finish();
	}
}
